package com.pioneer.web.manager.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.pioneer.common.core.domain.BaseEntity;
import java.io.Serializable;
import java.math.BigDecimal;

import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 *
 * @TableName man_goods
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value ="man_goods")
@Data
public class ManGoods extends BaseEntity implements Serializable {
    /**
     * 商品id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 商品名
     */
    @NotBlank(message = "商品名称不能为空")
    @TableField(condition = SqlCondition.LIKE)
    private String name;

    /**
     * 价格
     */
    private BigDecimal price;

    /**
     * 销量计数
     */
    private Long sellCount;

    /**
     * 库存量
     */
    private Long stock;

    /**
     * 类别
     */

    @TableField(condition = SqlCondition.LIKE)
    private String category;

    /**
     * 是否上架（1：上架，2：下架）
     */
    private String isOnSale;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
